package br.edu.ufcg.embedded.util;

import java.util.Hashtable;

import org.jgrapht.DirectedGraph;
import org.jgrapht.Graphs;
import org.jgrapht.graph.DefaultEdge;

import br.edu.ufcg.embedded.util.algo.GraphGenerator;
import br.edu.ufcg.embedded.util.algo.GraphGenerator2;
import br.edu.ufcg.embedded.util.algo.GraphGenerator3;

public class GraphGeneratorTester {
	
	public static void main(String[] args) 
	{
		Hashtable<String, Float> hash = new Hashtable<String, Float>();
		hash.put("A", new Float(0.562567923));
		hash.put("B", new Float(0.374304683));
		hash.put("C", new Float(0.063127394));
		
		GraphGenerator3 generator = new GraphGenerator3(hash);
		//Graph<String, DefaultEdge> graph = generator.generate(1000);
		
		DirectedGraph<String, DefaultEdge> graph = (DirectedGraph<String, DefaultEdge>)  generator.generate(1000);
		
		System.out.println(graph.vertexSet().size());
		
		for (String v : graph.vertexSet()) {
			
			System.out.println("V > " + v + " >>>>> " + Graphs.successorListOf(graph, v).size());
			System.out.println("V > " + v + " >>>>> " + Graphs.predecessorListOf(graph, v).size());
		}
		
	}
}